#include "ini_file_manager.h"

IniFileManager::IniFileManager(QString filePath)
	: filePath(filePath)
{

}


QString IniFileManager::readValue(QString section, QString key, QString defaultValue)
{
	QSettings settings(filePath, QSettings::IniFormat);
	settings.beginGroup(section);
	QString value = settings.value(key, defaultValue).toString();
	settings.endGroup();
	return value;
}

void IniFileManager::writeValue(QString section, QString key, QString value)
{
	QSettings settings(filePath, QSettings::IniFormat);
	settings.beginGroup(section);
	settings.setValue(key, value);
	settings.endGroup();
}
